// pages/lab/lab.js
var app=getApp();
var WxParse = require('../../../wxParse/wxParse.js');
Page({

  data: {},
    onLoad:function(options){
      console.log(options);
        var id = options.id;
        var that = this;
        wx.request({
            url: app.globalData.weburl + app.globalData.jiekou + "/get_news_details",
            header: {
                "Content-Type": "application/x-www-form-urlencoded"
            },
            method: "POST",
            data: { 'id': id },
            complete: function (res) {

                console.log(res);
                var emojisData = res.data.news_content;
                WxParse.wxParse('emojisData', 'html', emojisData, that);
                that.setData({
                  news_name: res.data.news_name,
                  service_content: res.data.service_content,
                  add_time: res.data.add_time,
                  source: res.data.source
                })
            }})
    }
})